home *** CD-ROM | disk | FTP | other *** search
- Path: bert.compusmart.ab.ca!usenet
- From: cpettica@compusmart.ab.ca (Chris)
- Newsgroups: comp.lang.c++
- Subject: Need help with far pointers to struct in .h file
- Date: 3 Mar 1996 22:09:52 GMT
- Organization: Your Organization
- Message-ID: <4hd5bg$cvd@bert.compusmart.ab.ca>
- NNTP-Posting-Host: remote140.compusmart.ab.ca
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.6
-
- When I try to run my program I get a general protection exception. It dies
- in this function, which of course is the first one called when I select
- checkers. I have marked the line, which is the first line executed.
-
- Do I have to declare the array somewhere(WM_CREATE ??) in the cpp file?
-
-
- void fnInitCheckerArray(LPARAM lParam)
- {
- GAMEDATA far * lPtr;
- lPtr = (GAMEDATA far *)lParam;
-
- for (int iRow = 0; iRow < CHECKER_ROWS; iRow++)
- for(int iColumn = 0; iColumn < CHECKER_COLUMNS; iColumn++)
- {
- if ((iRow + iColumn)%2)
- {
- if(iRow < 3)
- lPtr->aiCheckerArray[iRow][iColumn] = 1;
- else if (iRow > 4)
- lPtr->aiCheckerArray[iRow][iColumn] = 2;
- else
- lPtr->aiCheckerArray[iRow][iColumn] = 0;
- }
- else
- ----------------->>>>>> lPtr->aiCheckerArray[iRow][iColumn] = -1;
- }
- return;
- }
-
-
- Thanks in advance
- Chris
-
-